package com.cv.platform.dal.redis;

/**
 * 视频平台 - Redis Key 常量
 */
public interface RedisKeyConstants {

    /**
     * 平台服务 Redis Key 前缀
     */
    String PREFIX = "cv:platform:";

    /**
     * 每日 UV Redis Key
     */
    String DAILY_UV = PREFIX + "dailyUv:";

    /**
     * 每日视频类型 UV Redis Key
     * KEY 格式：cv:platform:dailyVideoTypeUv:{date}:{type}
     */
    String DAILY_VIDEO_TYPE_UV = PREFIX + "dailyVideoTypeUv:%s:%s";

    // ========= 视频、评论、回复点赞、踩 Redis Key =========

    /**
     * 视频点赞 Redis Key[总]
     * KEY 格式：cv:platform:videoLike
     */
    String VIDEO_LIKE = PREFIX + "videoLike";

    /**
     * 视频点赞 Redis Key
     * KEY 格式：cv:platform:videoLike:{userId}:{videoId}
     */
    String VIDEO_LIKE_DETAIL = PREFIX + "videoLike:%s:%s";

    /**
     * 视频踩 Redis Key[总]
     * KEY 格式：cv:platform:videoDislike
     */
    String VIDEO_DISLIKE = PREFIX + "videoDislike";

    /**
     * 视频踩 Redis Key
     * KEY 格式：cv:platform:videoDislike:{userId}:{videoId}
     */
    String VIDEO_DISLIKE_DETAIL = PREFIX + "videoDislike:%s:%s";

    /**
     * 视频评论点赞 Redis Key[总]
     * KEY 格式：cv:platform:videoCommentLike
     */
    String VIDEO_COMMENT_LIKE = PREFIX + "videoCommentLike:%s";

    /**
     * 视频评论点赞 Redis Key
     * KEY 格式：cv:platform:videoCommentLike:{userId}:{commentId}
     */
    String VIDEO_COMMENT_LIKE_DETAIL = PREFIX + "videoCommentLike:%s:%s";

    /**
     * 视频评论踩 Redis Key[总]
     * KEY 格式：cv:platform:videoCommentDislike
     */
    String VIDEO_COMMENT_DISLIKE = PREFIX + "videoCommentDislike";

    /**
     * 视频评论踩 Redis Key
     * KEY 格式：cv:platform:videoCommentDislike:{userId}:{commentId}
     */
    String VIDEO_COMMENT_DISLIKE_DETAIL = PREFIX + "videoCommentDislike:%s:%s";

    /**
     * 视频评论回复点赞 Redis Key[总]
     * KEY 格式：cv:platform:videoCommentReplyLike
     */
    String VIDEO_COMMENT_REPLY_LIKE = PREFIX + "videoCommentReplyLike";

    /**
     * 视频评论回复点赞 Redis Key
     * KEY 格式：cv:platform:videoCommentReplyLike:{userId}:{replyId}
     */
    String VIDEO_COMMENT_REPLY_LIKE_DETAIL = PREFIX + "videoCommentReplyLike:%s:%s";

    /**
     * 视频评论回复踩 Redis Key[总]
     * KEY 格式：cv:platform:videoCommentReplyDislike
     */
    String VIDEO_COMMENT_REPLY_DISLIKE = PREFIX + "videoCommentReplyDislike";

    /**
     * 视频评论回复踩 Redis Key
     * KEY 格式：cv:platform:videoCommentReplyDislike:{userId}:{replyId}
     */
    String VIDEO_COMMENT_REPLY_DISLIKE_DETAIL = PREFIX + "videoCommentReplyDislike:%s:%s";

    // ========= 搜索记录 Redis Key =========

    /**
     * 搜索记录 Redis Key
     * KEY 格式：cv:platform:dailySearchRecord:{date}
     */
    String DAILY_SEARCH_RECORD = PREFIX + "dailySearchRecord:%s";

}
